
export declare namespace Menu {

    type CommonTypes = {
        parentid: string // 父级id
        name: string // 名称
        status: boolean // 状态
        icon?: string // 图标 
        type: "directory" | "menu" | "button" // 菜单类型
    }

    interface MenuSearchQuery {
        _id?: string
        name?: string
        status?: boolean
        link?: boolean | undefined
        type?: 'directory' | 'menu' | 'button'
    }

    interface Directory extends CommonTypes{
        _id?:string
    }
    interface Menu extends CommonTypes {
        _id?:string,
        path: string,
        component: string,
        link?: boolean
        cache?: boolean
    }

    interface TreeMenuList extends Directory , Menu{
        children?:TreeMenuList[]
    }
}

// 路由类型
export interface StaticMenuRouter {
    _id: string
    parentid: string,
    path: string
    status: boolean
    name: string
    cache?: boolean | undefined
    icon?: string | undefined
    link?: boolean | undefined
    type?: 'directory' | 'menu' | 'button'
}
export interface MenuRouter extends StaticMenuRouter {
    component: any
    children: MenuRouter[]
}




